home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / utilities / misc / show1.0.lha / show / show.doc < prev    next >
Encoding:
Text File  |  1994-12-07  |  10.5 KB  |  303 lines

  1.                 Show Version 1.0
  2.  
  3.                (C) 1994 by Jeff Shepherd
  4.  
  5.  
  6.  Table of Contents
  7.  
  8.  Installation
  9.  What is show?
  10.  Using Show
  11.  Show Preferences program
  12.  Man program
  13.  About Show
  14.  About The Author
  15.  ToDo
  16.  
  17. 2.    Installation
  18.  
  19. NOTE: At least Workbench 2.04 is needed to run show!!!
  20.  
  21. Show comes complete with an Installer script. Just double-click on the
  22. "Show_Install" icon and proceed. There are three versions of show -
  23. Show_020ffp and Showprefs_020ffp can be used if your Amiga has a >= 68020
  24. processor with a FPU. Show_020 and Showprefs_020 can be used if your Amiga
  25. have a    >= 68020 processor. Show and showprefs can be used with any
  26. combination of processor and FPU.
  27.  
  28. The script installs two programs - the show preferences program and the show
  29. program itself. The installation procedure can sense that a previous version
  30. of Show was installed and asks if you want to overwrite it.
  31.  
  32. You have the option to install the sample prefs file that came with this
  33. archive. I would suggest that you install the sample preferences then edit the
  34. entries later using the preferences program.
  35.  
  36. 3.    What is Show?
  37.  
  38. Just what exactly is Show? Show is a program that associates suffixes with
  39. commands. Here is an example. In the preferences file the suffix ".doc"
  40. associated with "more". To display the file "foo.doc" just type show foo.doc
  41. and it will be displayed using the program more.
  42.  
  43. I use the word suffix loosely. The "suffix" does not have to be at the end of
  44. the filename it can occur at the beginning or anywhere in the filename. The
  45. prefix "mod." is associated with mod files even though the filename starts
  46. with "mod."
  47.  
  48. Commands can be as simple as a program name or as complex as multiple
  49. commands. In the sample preferences supplied with this package, a complex
  50. command is used for the suffix ".1". This command is useful when you have unix
  51. man pages stored in their original Troff format. I have included a simple
  52. alternative for UN*X man command stored in the man directory included with
  53. this archive. Click on man for more details.
  54.  
  55. 4.    Using Show
  56.  
  57. Show can be run either from the Workbench by clicking on its icon or by the
  58. CLI
  59.  
  60. CLI Usage:
  61.  Typing show with no arguments will show the following message:
  62.  
  63.   USAGE: show [-f suffix] filename [[-f suffix] filename2...]
  64.  
  65.  
  66.  The -f parameter forces the filename to be associated with a certain suffix.
  67. Note that -f changes the suffix for the next filename only. To override the
  68. suffix of two or more files, you must specify -f suffix for all the files. If
  69. a suffix is not recognized in the filename or the suffix specified with -f is
  70. invalid the following message will appear:
  71.  
  72. ERROR: suffix in <file> not found  where <file> is the filename specified from
  73. the command.
  74.  
  75.  Show also works with wildcards. For example: show #?.guide will invoke a
  76. Multiview (if Multiview is associated with .guide in the preferences program)
  77. for each guide file in the current directory.
  78.  
  79. WB Usage
  80.  
  81.  Starting Show from Workbench, works a little bit differently than starting
  82. Show from the CLI. First if the selected files have an .info file, Show looks
  83. for the SHOWSUFFIX tooltype to determine which suffix to look for. If no .info
  84. is found, Show looks for suffixes in the filename.
  85.  
  86.  Show can be started on its own or by multiselecting Show with other files by
  87. holding the SHIFT key and selecting files.
  88.  
  89.  Double-clicking Show with no other icons opens an ASL requester. You can
  90. choose one file or many using multiple file selection. Selection continues
  91. until CANCEL is hit.
  92.  
  93. 5.    Show Preferences Program
  94.  
  95. The Show preferences program is used to create the preferences file. The
  96. preferences file is used by show to hold the suffixes and commands associated
  97. with them.
  98.  
  99. When you enter the Show preferences program the following screen will appear:
  100.  
  101.  +------------------------------------------------------+--+--+
  102.  +------------------------------------------------------+--+--+
  103.  |      Show V1.0                          |
  104.  |   ©1994 Jeff Shepherd               Suffixes       |
  105.  |                       +-------------+-+  |
  106.  |         Suffix               |         | |  |
  107.  |     +-------------+               |         | |  |
  108.  |     +-------------+               |         | |  |
  109.  |                       |         | |  |
  110.  |        Command               |         | |  |
  111.  |     +-------------+               |         | |  |
  112.  |     +-------------+               |         | |  |
  113.  |                       +-------------+-+  |
  114.  |       Asynchronous            +---+ +----+ +---+ |
  115.  |           +-+               |New| |Copy| |Del| |
  116.  |           +-+               +---+ +----+ +---+ |
  117.  |   +------+             +-----+          +--------+  |
  118.  |   | Save|             | Use|          | Cancel |  |
  119.  |   +------+             +-----+          +--------+  |
  120.  |                                  |
  121.  +------------------------------------------------------------+
  122.  
  123. Here are the Preferences Menus. They function as close as possible to the ones
  124. used by the Workbench preferences programs.
  125.  
  126.  Project Menu
  127.  ------------
  128.  Open
  129.  Save As...
  130.  About
  131.  Quit
  132.  
  133.  
  134.  Edit Menu
  135.  ---------
  136.  Last Saved
  137.  Restore
  138.  
  139. Note on the preference program
  140.  
  141. I have made the preferences program as font-adaptive as possible. The text
  142. used by the preference program is the "System Default Font" of the Font
  143. preferences. If the window cannot be fit into the screen using this font, the
  144. preferences program will default to topaz 8. Also if the font changes while
  145. the preferences program is still running, it will close itself and re-render
  146. itself using the new fonts. Also if the screenmode changes, the preferences
  147. program will reopen itself on the new screen. I don't think any preferences
  148. program can boast these features!!!
  149.  
  150. Preference Gadgets and Menus
  151. ----------------------------
  152.  
  153.       Suffixes
  154.  
  155. The Suffixes listview shows a list of the currently defined suffixes. Use the
  156. up and down arrows to reveal more suffixes. To select a suffix just click on
  157. its name, the Suffix box, Command box and Asynchronous checkbox will show the
  158. suffix, command and Asynchronous flag respectively for the suffix.
  159.  
  160.       Suffix
  161.  
  162. Allows you to edit the suffix of the currently suffix. If no suffix is
  163. selected anything you type will be ignored. Make sure you press ENTER after
  164. you are done to allow the new suffix to be registered.
  165.  
  166.       Command
  167.  
  168. Allows you to edit the command of the currently suffix. If no suffix is
  169. selected anything you type will be ignored. Make sure you press ENTER after
  170. you are done to allow the new command to be registered.
  171.  
  172.       Asynchronous
  173.  
  174. If the Asynchronous checkbox is checked, the command is executed
  175. asynchronously ie the program regains control immediately although the command
  176. may still be executing. The way I implemented asynchronous command execution
  177. is tack a "RUN >NIL:" in front of the command. The drawbacks of doing so is
  178. that any errors that might occur will never be shown. If you type "show
  179. <filename>" and nothing happens, clear the Asynchronous checkbox through the
  180. preferences program and run the command again.
  181.  
  182.      New
  183.  
  184. Makes a new node a places it at the front of the suffix list. The suffix
  185. defaults to (New Suffix). To edit the suffix or command, click on the string
  186. edit box and change the string. Make sure you press RETURN when finished.
  187.  
  188.      Copy
  189.  
  190. Copies the currently selected node and places the new node on top of the
  191. suffix list. If no node was selected, this gadget does nothing. Follow the
  192. instructions for the New gadget.This option is good when you have multiple
  193. suffixes using the same command.
  194.  
  195.      Del
  196.  
  197. Deletes the currently selected node. If no node was selected, this gadget does
  198. nothing. NOTE: You cannot get back what you have deleted from this command.
  199.  
  200.      Save
  201.  
  202. Saves the preferences files in ENV: and ENVARC: and exits the program.
  203.  
  204.      Use
  205.  
  206. Saves the preferences files in ENV: and exits the program. The new preferences
  207. will be erased when the computer is turned off.
  208.  
  209.      Cancel
  210.  
  211. Exits the preferences program without saving anything.
  212.  
  213.      Open
  214.  
  215. Open a previously saved preferences file. An ASL requester will appear to
  216. allow you to choose a file. The default file is
  217. SYS:prefs/presets/prefs.presets.
  218.  
  219.      Save As...
  220.  
  221. Allows you save the preferences file under a different name. An ASL requester
  222. will appear to allow you to save the file. The default name is
  223. SYS:prefs/presets/show.presets.
  224.  
  225.      About
  226.  
  227. Brings up a requester showing the version of Show and little text about
  228. myself. Click OK to end the requester.
  229.  
  230.      Quit
  231.  
  232. Quits the preferences program without saving the preferences file. It is the
  233. same as pressing the CANCEL gadget.
  234.  
  235.      Last Saved
  236.  
  237. Restores the preferences that were last saved using Save.
  238.  
  239.      Restore
  240.  
  241. Restores the preferences that were loaded when the preferences program began.
  242.  
  243. 5.   Man program
  244.  
  245. Included in the man directory of this archive is my alternative for the UN*X
  246. man command. It displays man pages only. You cannot use 'man -k' for keyword
  247. searches or anything else.
  248.  
  249. To use the man program, you need the program csh or sh. If you don't have
  250. either one, csh can be found on aminet in the directory util/shell. If you
  251. have man pages stored in Troff format you will also need groff to process
  252. them. If you need groff, contact myself or grab the groff binary on aminet
  253. under the util/gnu directory.
  254.  
  255. It would also be wise to install the sample preferences included with this
  256. archive since it has the necessary commands for dealing with unix man pages.
  257. If you did not, the suffixes .0, .1 up to .9 need to be defined along with the
  258. commands for them.
  259.  
  260. To install man, rename the old man program (if an older one exists) and copy
  261. the contents of the man directory to wherever you want man installed. Add the
  262. installed directory to your path if necessary.
  263.  
  264. To configure man, edit the files man and man.sh. The comments contained
  265. therein are self-explanatory.
  266.  
  267. 6.     About Show
  268.  
  269. Show is COMMENT/BUGWARE. This means if have you have any bugs/comments just
  270. email me and I will be happy to answer them. Also no fee can be charged for
  271. distributing this program except for a nominal fee for disks. Permission is
  272. given to Fred Fish to distibute this program with his Fish disk library.
  273.  
  274. The source is included. RCS is needed to view the source code. I suggest
  275. getting HWGRCS found on aminet in dev/misc. Although Show is essentially
  276. FREEWARE the copyright is kept by myself.
  277.  
  278. 7.     About the Author
  279.  
  280. I am a third-year student at the University of Waterloo in Waterloo, ON,
  281. Canada.  I am majoring in Computer Science with Electrical Engineering
  282. Electives or CS/EEE for short. If you have any suggestions, comments or bugs
  283. feel free to email me at:
  284.  
  285.   jsshephe@undergrad.math.uwaterloo.ca
  286.  
  287.  or if you prefer snail-mail:
  288.  
  289.  Jeff Shepherd
  290.  47 Columbia West
  291.  Waterloo, ON
  292.  N2L 3K4
  293.  
  294. Being a co-op student, I move around a lot.  Using my email address is
  295. preferred since it is always redirected to where I am working at the moment.
  296.  
  297. 8.     TODO
  298.  
  299.  - Added wildcards to suffixes.
  300.  - Make show pure.
  301.  - Add locale options to the preference program and show.
  302.  
  303.